﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="SIMManager.aspx.cs" Inherits="System_Mobile_SIMManager" culture="auto" meta:resourcekey="Title" uiculture="auto"%>
<%@ Register  Src="~/UserControl/DataPager.ascx" TagName="DataPager" TagPrefix="ctl" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">

    <style type="text/css">
        .tdHeight
        {
            height: 50px;
        }
        table
        {
        	width:100%;
        	text-align:left;
        }
    </style>


    <script language="javascript" type="text/javascript">
// <!CDATA[

        // 文本框失去焦点时，去除前后空格
//        $(document).ready(function() {
//            $("input[type='text']").blur(function() { this.value = this.value.trim(); });
//        });

// ]]>
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
    </asp:ScriptManagerProxy>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<div class="accordion" style="width:800px;">
    <h3>
        <asp:Literal ID="Literal1" runat="server" meta:resourcekey="SIMManager" />
    </h3>
    <div style="text-align:center;">
        <table>
            <tr>
                <td>
                    <asp:Literal ID="Literal8" runat="server" meta:resourcekey="Quick"></asp:Literal>
                    <input id="txtSearch" type="text" runat="server" maxlength="32"/>
                    <asp:Button ID="btnSearch" runat="server" CssClass="but" 
                        meta:resourcekey="Search" onclick="btnSearch_Click" />
                </td>
            </tr>
            <tr>
                <td style="text-align:center">
                    <asp:GridView ID="gvResult" runat="server" AllowPaging="True" DataKeyNames="IMSICode" 
                    CssClass="datalist" Width="100%" PageSize="3" AutoGenerateColumns="False" 
                    onrowdatabound="gvResult_RowDataBound" 
                        onselectedindexchanged="gvResult_SelectedIndexChanged" OnPageIndexChanging="PageIndexChanged"  >
                   
                    <Columns>
                        <asp:BoundField DataField="IMSICode" HeaderText="IMSI" />
                        <asp:BoundField DataField="PhoneNumber" meta:resourcekey="HeaderPhone" />
                        <asp:TemplateField meta:resourcekey="HeaderIsActive">
                            <ItemTemplate>
                                <font size='3' color='green' style="font-weight: bold">
                                    <%# Convert.ToBoolean(Eval("IsActive")) ? "√" : "×"%>
                                </font>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField meta:resourcekey="HeaderControl" >
                                <ItemTemplate>
                                    <asp:Button ID="btnModify" CommandName="Select" class="but"  meta:resourcekey="Modify" runat="server" />
                                </ItemTemplate>
                            </asp:TemplateField>
                    </Columns>    
                    <PagerTemplate>
                                
                                <ctl:DataPager ID="DataPager1" runat=server />
                             </PagerTemplate>
                    </asp:GridView>
                     </td>
            </tr>
            <tr>
                <td style="text-align:right">
                    <asp:Button ID="btnCreate" runat="server"  meta:resourcekey="Create" 
                        CssClass="but" onclick="btnCreate_Click" />
                </td>
            </tr>
        </table>
    </div>
</div>
<div class="accordion" style="width:800px;">
    <h3>
        <asp:Literal ID="Literal2" runat="server" meta:resourcekey="SIMInfo" />
        <asp:Literal ID="litInfo" runat="server"></asp:Literal>
    </h3>
    <div style="text-align:center">
        <table>
            <tr class="tdHeight">
                <td>
                    IMSI
                </td>
                <td>
                    <input id="txtIMSI" type="text" runat="server"  maxlength="32"/>
                    <font color="red">*</font>
                </td>
                <td>
                    <asp:Literal ID="Literal4" runat="server"  meta:resourcekey="Phone"></asp:Literal>
                </td>
                <td>
                    <input id="txtPhone" type="text" runat="server"  maxlength="32"/>
                    <font color="red">*</font>
                </td>
                <td>
                    <asp:Literal ID="Literal7" runat="server"  meta:resourcekey="IsActive"></asp:Literal>
                </td>
                <td>
                    <asp:RadioButtonList ID="rbtnIsActive" runat="server" RepeatDirection="Horizontal">
                        <asp:ListItem Text="<%$ Resources:SiteMap, Yes %>"></asp:ListItem>
                        <asp:ListItem Text="<%$ Resources:SiteMap, No %>"></asp:ListItem>
                    </asp:RadioButtonList>
                </td>
            </tr>
            <tr  class="tdHeight">
                <td>
                    <asp:Literal ID="Literal3" runat="server"  meta:resourcekey="UpdateBy"></asp:Literal>
                </td>
                <td>
                    <input id="txtUpdateBy" type="text" readonly="readonly"  runat="server"/>
                </td>
                <td>
                    <asp:Literal ID="Literal6" runat="server" meta:resourcekey="UpdateTime"></asp:Literal>
                </td>
                <td colspan="2">
                    <input id="txtUpdateTime" type="text"  readonly="readonly"  runat="server"/>
                </td>
            </tr>
            <tr>
                <td colspan="6" style="text-align:right">
                    <asp:CheckBox ID="chkMore" runat="server" meta:resourcekey="More" Visible="false" /> 
                    <asp:Button ID="btnOk" runat="server" CssClass="but" meta:resourcekey="OK" onclick="btnOk_Click" Enabled="false" />
                    &nbsp;
                    <asp:Button ID="btnReset" runat="server" CssClass="but" 
                        meta:resourcekey="Reset" onclick="btnReset_Click"  Enabled="false"/>
                </td>
            </tr>
        </table>
    </div>
</div>
<input id="txtSelect" type="text" runat=server style="display:none" />
</ContentTemplate>
    <Triggers>
        <asp:AsyncPostBackTrigger ControlID="btnOk" EventName="Click"/>
        <asp:AsyncPostBackTrigger ControlID="btnReset" EventName="Click"/>
        <asp:AsyncPostBackTrigger ControlID="btnCreate" EventName="Click"/>
        <asp:AsyncPostBackTrigger ControlID="btnSearch" EventName="Click"/>
        <asp:AsyncPostBackTrigger ControlID="gvResult" EventName="SelectedIndexChanged" />
    </Triggers> 
</asp:UpdatePanel>
</asp:Content>
